package com.Merlin.myapplication.kotlin

fun main() {
    demo1()
}

fun demo1() {
    var numbers = listOf(1, 2, 3, 4, 5)

    // var newList = numbers.filter { it > 2 }
    var newList = numbers.filter({ it -> it > 2 })
    println(newList)
}

fun demo2() {
    var numbers = listOf(1, 2, 3, 4, 5)

    var newList = numbers.filter { it > 2 }
    println(newList)
}